<template>
  <div class="container-infoo">
    <h1>哈哈哈哈哈哈!</h1>
  
 <div class="haha">
      <vue-preview :slides="slide1" @close="handleClose"></vue-preview>
 </div>
 <comment></comment>

  </div>
</template>
<script>
import comment from "../subcomponents/comment.vue";
export default {
  data() {
    return {
      slide1 : []
    };
  },
  created () {
       this.getall()
  },
  methods: {
    getall() {
      this.$http
        .post("http://api.wangshuwen.com/getBeautyImages?page=4")
        .then(result => {
          if (result.status == 200) {
            //  console.log(result.body.data.imgs);
              result.body.data.imgs.forEach(item=>{
                item.src = item.thumbnailUrl;
                item.msrc = item.thumbnailUrl;
                item.alt = '未知';
                item.w = 600;
                item.h = 400;
              })
              this.slide1 = result.body.data.imgs;
              // console.log(this.slide1);
          } else {
            Toast("获取失败");
          }
        })
    },
    handleClose () {
    console.log('close event')
    }
  },
  components : {
    comment : comment,
  }
};
</script>
<style>
.container-infoo{
    margin-top: 50px 0px;
}
.haha {
  display: flex;
  flex-wrap: wrap;
}
.haha > div {
  width: 100%;
}
.haha img {
  width: 90px;
  height: 50px;
  float: left;
}
</style>
